package com.songlanyun.modules.account.dao;

import com.songlanyun.modules.account.entity.UserIdentityAssetEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * 会员的资产表（记录余额，一级分拥所得，二级分拥所得等）
 *
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2020-11-03 10:01:15
 */
@Mapper
public interface UserIdentityAssetDao extends BaseMapper<UserIdentityAssetEntity> {

    int updateUserBalance(UserIdentityAssetEntity userIdentity);

    UserIdentityAssetEntity loadByIdForLock(@Param("userId") Long userId);

    BigDecimal countAllActivationUseCommissionAble();
}
